//
//  ViewController.m
//  10509
//
//  Created by student on 16/2/19.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController
- (IBAction)view:(UIControl *)sender {

    [self.lengthtextField resignFirstResponder];
    [self.widthtextField resignFirstResponder];
    [self.radiustextField resignFirstResponder];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)BtnPressed:(UIButton *)sender
{
    NSString *string = [NSString stringWithFormat:@"%i",[self.lengthtextField.text intValue]*[self.widthtextField.text intValue]];
    self.areastextField.text = string;
    
    NSString *string2 = [NSString stringWithFormat:@"%.2lf",[self.radiustextField.text floatValue]*[self.radiustextField.text floatValue]*3.1415926];
    self.circleareastextField.text = string2;
}
@end
